package com.tedu.springdemo.day03;

import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.Set;

/**
 * Spring IOC 控制反转：范式【标准写法，注意细节，属性参数使用】
 *        DI  依赖注入：针对类中属性问题---注入值
 * 创建对象---Spring容器管理---获取构造器、方法【属性】
 */
public class Demo {
    private String name;
    private int age;
    private List<String> list;
    private Set<String>  set;
    private Map<String,Object> map;
    private Properties properties;   //静态文件类型【类】
    //引用类型  DI注入
    private Pig p;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public List<String> getList() {
        return list;
    }

    public void setList(List<String> list) {
        this.list = list;
    }

    public Set<String> getSet() {
        return set;
    }

    public void setSet(Set<String> set) {
        this.set = set;
    }

    public Map<String, Object> getMap() {
        return map;
    }

    public void setMap(Map<String, Object> map) {
        this.map = map;
    }

    public Properties getProperties() {
        return properties;
    }

    public void setProperties(Properties properties) {
        this.properties = properties;
    }
    //打印 属性的值  重写toString()   包.类@16进制值【不需要手写】


    public Pig getP() {
        return p;
    }

    public void setP(Pig p) {
        this.p = p;
    }

    @Override
    public String toString() {
        return "Demo{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", list=" + list +
                ", set=" + set +
                ", map=" + map +
                ", properties=" + properties +
                ", p=" + p +
                '}';
    }
}
